<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<link rel="stylesheet" type="text/css"
	href="<c:url value="/static/jquery-easyui/themes/default/easyui.css"/>">
<link rel="stylesheet" type="text/css"
	href="<c:url value="/static/jquery-easyui/themes/icon.css"/>">
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/jquery-1.6.min.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/jquery.easyui.min.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/plugins/jquery.panel.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/plugins/jquery.datagrid.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/plugins/jquery.messager.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/ext-for-framework.js.jsp"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/locale/easyui-lang-zh_CN.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/js/common.js"/>"></script>
<script>
	function initList(listDisplayEId) {
		$('#' + listDisplayEId)
				.datagrid(
						{
							url : "<c:url value="/cashier/cashierListDetailForShop.do"/>" + "?cashierId=${cashierOrderPo.cashierId }",
							nowrap : false,
							striped : true,
							collapsible : true,
							remoteSort : true,
							notSelectByRow : false,
							toolbar : [ {
								id : listDisplayEId + '_btn_add',
								text : '新增',
								iconCls : 'icon-add',
								handler : function() {
									window
											.open(
													"<c:url value='/jsp/openIndexSun.jsp?url=/company/preSaveCompany.do'/>",
													"sun",
													"width=1200px,height=600px,status=no,scrollbars=yes");
									$('#' + listDisplayEId).datagrid('reload');
								}
							} ],
							onLoadError : function() {
								$.messager.alert('错误', '获取数据失败，请与管理员联系！',
										'error');
							},
							onClickRow : function(rowIndex) {
								$(".myrad").prop("checked", false);
								$(".myrad").eq(rowIndex).prop("checked", true);
							}
						});
	};
	$(document).ready(function() {
		initList('listDisplay');
	});
</script>
</head>
<body>
	<table width="98%">
		<tr style="height: 12px;"></tr>
		<tr>
			<td>
				<table id="listDisplay" title="售卖商品列表" iconCls="icon-list"
					singleSelect="true" idField="cashierId"
					loadMsg="请稍候......" pagination="true" pageSize="20"
					pageList="[10,20,30,40,50,100,150,200]" sortName="companyId"
					rownumbers="true" sortOrder="asc">
					<thead>
						<tr>
						    <th field="cashierDetailId" width="80" hidden="true">订单id</th>
							<th field="cashierId" width="80">订单id</th>
							<th field="foodId" width="80">商品id</th>
							<th field="foodName" width="150">商品名称</th>
							<th field="foodNumber" width="80" >数量</th>
							<th field="foodValue" width="80">总价</th>
						</tr>
					</thead>
				</table>
			</td>
		</tr>
	</table>
</body>
</html>